<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>大富翁3</title>
    <script src="/js/jquery.min.js?v=2.1.4"></script>
    <style>
        html, body {
            height: 100%;
            width: 100%;
            overflow: hidden;
            padding: 0;
            margin: 0;
        }
    </style>
    <script type="text/javascript" >
        $ ( function () {} );

        function editMoney() {
            var money = $('#money').val();
            $.ajax({
                type: "post",
                url: "/rich3/money",
                data: {
                    'money': money
                },
                success: function (data) {
                    showRes('#moneyShow', data);
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {

                }
            });
        }

        function hideRes() {
            $('#moneyShow').hide()
            $('#pointShow').hide()
        }

        function showRes(id, data) {
            $(id).html(data);
            $(id).show();
            setTimeout('hideRes()', 1500)
        }

        function editPoint() {
            var point = $('#point').val();
            $.ajax({
                type: "post",
                url: "/rich3/point",
                data: {
                    'point': point
                },
                success: function (data) {
                    showRes('#pointShow', data);
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {

                }
            });
        }
    </script>
</head>
<body>
    <div style="height:100%;width:100%;margin: 40px;font-size: 30px;position: fixed;z-index: 100;">
        <div>
            <span>现金：</span>
            <input id="money" style="font-size: 30px;" />
            <button style="font-size: 30px;" onclick="editMoney()">修改</button>
            <span id="moneyShow"></span>
        </div>
        <div style="margin-top: 40px;">
            <span>点券：</span>
            <input id="point" style="font-size: 30px;" />
            <button style="font-size: 30px;" onclick="editPoint()">修改</button>
            <span id="pointShow"></span>
        </div>
    </div>
    <div style="height:100%;width:100%;background: url(/image/rich3.jpg);position: absolute;opacity: 0.2;"></div>
</body>
</html>